package com.dxh.vt.web;

import org.springframework.data.domain.Page;
import org.springframework.ui.Model;

/**
 * 
 * @author crazylion
 *
 */
public class BaseWebController  {

	/**
	 * 增加翻页信息给前台显示
	 * @param model
	 * @param pageModels
	 */
	public void addPageinfo(Model model,Page pageModels ) {
		model.addAttribute("totalpages", pageModels.getTotalPages());
		model.addAttribute("total", pageModels.getTotalElements());
		model.addAttribute("pagesize", pageModels.getSize());
		model.addAttribute("pageindex", pageModels.getNumber());
	}


}
